Skip to content

fix: add whitespace in macro for delegate assists#22330

Open
A4-Tacks wants to merge 4 commits into
rust-lang:masterfrom
A4-Tacks:pretty-delegate-in-macro
Open

fix: add whitespace in macro for delegate assists#22330
A4-Tacks wants to merge 4 commits into
rust-lang:masterfrom
A4-Tacks:pretty-delegate-in-macro

Conversation

@A4-Tacks

Copy link
Copy Markdown
Member
  • Move pretty_pat_in_macro to utils
  • Insert ws out of node for prettify_macro_expansion
  • Pretty in macro for generate_delegate_methods
  • Pretty in macro for generate_delegate_trait

Before:

pub fn test(self,b: &mutbar::Bar) ->bar::Bar {
    self.bar.test(b)
}

After:

pub fn test(self,b: &mut bar::Bar) -> bar::Bar {
    self.bar.test(b)
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 10, 2026
@A4-Tacks A4-Tacks force-pushed the pretty-delegate-in-macro branch 2 times, most recently from 6eaba64 to 356e906 Compare May 10, 2026 03:35
@rustbot

This comment has been minimized.

A4-Tacks added 4 commits May 29, 2026 16:13
**Before**

```text
VISIBILITY@0..4
  PUB_KW@0..3 "pub"
  WHITESPACE@3..4 " "
FN_KW@4..6 "fn"
WHITESPACE@6..7 " "
...
```

**After**

```rust
VISIBILITY@0..3
  PUB_KW@0..3 "pub"
WHITESPACE@3..4 " "
FN_KW@4..6 "fn"
...
```
@A4-Tacks A4-Tacks force-pushed the pretty-delegate-in-macro branch from 356e906 to a401c8f Compare May 29, 2026 08:18
@rustbot

rustbot commented May 29, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants